package org.elanfox.intellicommunity.biz.service.core.msg;

import org.elanfox.intellicommunity.biz.dto.msg.NodeMsgDTO;
import org.elanfox.intellicommunity.biz.entity.msg.LocationMsgPO;
import org.elanfox.intellicommunity.biz.entity.msg.NodeMsgPO;
import org.elanfox.intellicommunity.data.base.base.SearchableCrudService;

/**
 * @author allan
 * @version 1.0.0
 * @date 2019/12/19
 */
public interface NodeMsgService extends SearchableCrudService<NodeMsgPO, Long> {
    /**
     * 根据用户找到最新的一条节点消息
     *
     * @param userId
     * @return
     */
    NodeMsgDTO findLastByUser(Integer userId);

    /**
     * 保存节点消息
     *
     * @param locationMsgPO
     * @return
     */
    NodeMsgPO save(LocationMsgPO locationMsgPO);
}
